class Animal:

    def __init__(self, name: str):
        self.name = name

    def eat(self):
        print("%s 在吃东西" % self.name)

    def drink(self):
        print("%s 喝" % self.name)

    def run(self):
        print("%s 跑" % self.name)

    def sleep(self):
        print("%s 睡" % self.name)


class Dog(Animal):

    def __init__(self, name: str):
        super().__init__(name)

    def dark(self):
        print("狒狒")
        pass


print(Dog.mro())

animal = Animal("狗")
animal.eat()
animal.drink()
animal.run()
animal.sleep()
print(animal.__dir__())

dog = Dog("xx")
dog.dark()

print(hasattr(animal, "name"))
